package strauss.flatland.things.geometry;

import java.awt.geom.Point2D;


public class Vertex extends Point2D.Double {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1006563319191266280L;

	public Vertex(double x, double y) {
		super(x,y);
	}
	
	public Vertex(Vertex vertex) {
		setLocation(vertex);
	}
		
	public void translate(GeometricVector vector) {
		double xNewLocation = this.getX()+vector.getXD();
		this.setLocation(xNewLocation, this.getY()+vector.getYD());
	}
	
	public String toString() {
		return String.format("(%f,%f)", getX(),getY());
	}
	
}
